/*
 * MainWindow.java
 *
 * Created on December 10, 2007, 8:26 PM
 */

package yasdatmcc;

import java.awt.Cursor;
import java.sql.SQLException;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import sqlComm.SqlComm;
import oracle.jdbc.*;
import java.util.*;
import java.text.*;
import imageViewer.ImageViewer;
import oracle.jdbc.driver.OraclePreparedStatement;

/**
 * 
 * @author Daniel Peka?, xpekar04 a David Gargul?k, xgargu01
 */
public class MainWindow extends javax.swing.JFrame {
    
    private sqlComm.ConsoleDialog consoleModule;
    private static boolean offline;
    //private editor.Editor e;    
    
    /** Creates new form MainWindow */
    public MainWindow() {
        initComponents();
        consoleModule = new sqlComm.ConsoleDialog(this, false);
        consoleModule.setLocationRelativeTo(this);
        sqlComm.SqlComm sql = new SqlComm();
        offline = true;
        // disable logout item
        jMenuItem4.setEnabled(false);
        // enable Login item
        jMenuItem3.setEnabled(true);
        jDialog1.setSize(400,180);
        jDialog1.setLocationRelativeTo(this);
        jDialog1.setModal(true);
        jDialog1.setVisible(true);       
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jDialog1 = new javax.swing.JDialog();
        jToggleButton1 = new javax.swing.JToggleButton();
        jToggleButton2 = new javax.swing.JToggleButton();
        jTextField1 = new javax.swing.JTextField();
        jTextField2 = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTextField3 = new javax.swing.JTextField();
        jTextField4 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTextField5 = new javax.swing.JTextField();
        jDialog2 = new javax.swing.JDialog();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jTextField6 = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        jTextField7 = new javax.swing.JTextField();
        jButton4 = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jButton5 = new javax.swing.JButton();
        jLabel22 = new javax.swing.JLabel();
        jTextField8 = new javax.swing.JTextField();
        jButton8 = new javax.swing.JButton();
        jLabel23 = new javax.swing.JLabel();
        jButton9 = new javax.swing.JButton();
        jLabel24 = new javax.swing.JLabel();
        jButton10 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        jLabel26 = new javax.swing.JLabel();
        jButton12 = new javax.swing.JButton();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTable6 = new javax.swing.JTable();
        jLabel25 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jDialog3 = new javax.swing.JDialog();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTable5 = new javax.swing.JTable();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        jMenuItemNew = new javax.swing.JMenuItem();
        jMenuItemLoad = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JSeparator();
        jMenuItem5 = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JSeparator();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();

        jDialog1.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        jDialog1.setTitle("Login");
        jDialog1.setAlwaysOnTop(true);
        jDialog1.setUndecorated(true);
        jToggleButton1.setText("Login");
        jToggleButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton1ActionPerformed(evt);
            }
        });

        jToggleButton2.setText("Work Offline");
        jToggleButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton2ActionPerformed(evt);
            }
        });

        jTextField1.setText("jdbc:oracle:thin:@pcuifs1.fit.vutbr.cz:1521:stud");
        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });

        jTextField2.setText("xpekar04");
        jTextField2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField5ActionPerformed(evt);
            }
        });

        jLabel1.setText("user:");

        jLabel2.setText("password:");

        jTextField3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField5ActionPerformed(evt);
            }
        });

        jTextField4.setText("pcuifs1.fit.vutbr.cz:1521");
        jTextField4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField5ActionPerformed(evt);
            }
        });

        jLabel3.setText("server:");

        jLabel4.setText("context:");

        jTextField5.setText("stud");
        jTextField5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDialog1Layout.createSequentialGroup()
                .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jDialog1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE))
                    .addGroup(jDialog1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4))
                        .addGap(18, 18, 18)
                        .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
                            .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
                            .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
                            .addComponent(jTextField5, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDialog1Layout.createSequentialGroup()
                                .addComponent(jToggleButton1)
                                .addGap(62, 62, 62)
                                .addComponent(jToggleButton2)))))
                .addContainerGap())
        );
        jDialog1Layout.setVerticalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDialog1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(16, 16, 16)
                .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jToggleButton2)
                    .addComponent(jToggleButton1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jDialog2.setMinimumSize(new java.awt.Dimension(650, 650));
        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        jButton1.setText("Load");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel5.setText("Find accidents where distance betwen two vehicles is less than");

        jButton2.setText("Execute");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel6.setText("Find accidents where cars crosses objects");

        jButton3.setText("Execute");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jLabel7.setText("Find accidents where surface of car is larger than");

        jButton4.setText("Execute");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jLabel8.setText("Find accidents where car is situated out of crossroads");

        jButton5.setText("Execute");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jLabel22.setText("Find accidents where the witness's image description is similar with:");

        jTextField8.setMinimumSize(new java.awt.Dimension(600, 20));

        jButton8.setText("Execute");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jLabel23.setText("Display all accidents:");

        jButton9.setText("Execute");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jLabel24.setText("Find similar image like some one in Witness's photos table:");

        jButton10.setText("View");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        jButton11.setText("Execute");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        jLabel26.setText("Display all witness's photos:");

        jButton12.setText("Execute");
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });

        jLabel27.setText("meters");

        jLabel28.setText("meters^2");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 171, Short.MAX_VALUE)
                        .addComponent(jButton4))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 270, Short.MAX_VALUE)
                        .addComponent(jButton5))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel27)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 95, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 476, Short.MAX_VALUE)
                        .addComponent(jButton9))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel22)
                            .addComponent(jLabel24))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 89, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 75, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jButton11)
                            .addComponent(jButton8)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel26)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 427, Short.MAX_VALUE)
                        .addComponent(jButton12)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton2)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jButton3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton4)
                    .addComponent(jLabel28))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jButton5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(jButton11)
                    .addComponent(jButton10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(jButton9))
                .addGap(6, 6, 6)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(jButton12)))
        );

        jButton6.setText("Info");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        jButton7.setText("Delete");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        jTable6.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane6.setViewportView(jTable6);

        jLabel25.setText("Witness's photos:");

        jLabel29.setText("Accidents:");

        javax.swing.GroupLayout jDialog2Layout = new javax.swing.GroupLayout(jDialog2.getContentPane());
        jDialog2.getContentPane().setLayout(jDialog2Layout);
        jDialog2Layout.setHorizontalGroup(
            jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDialog2Layout.createSequentialGroup()
                .addGroup(jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jDialog2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jDialog2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jDialog2Layout.createSequentialGroup()
                                .addComponent(jButton1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton6)
                                .addGap(45, 45, 45)
                                .addComponent(jButton7))
                            .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 318, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 712, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jDialog2Layout.createSequentialGroup()
                        .addGap(13, 13, 13)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 711, Short.MAX_VALUE)))
                .addGap(22, 22, 22))
            .addGroup(jDialog2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel29)
                .addContainerGap(671, Short.MAX_VALUE))
        );
        jDialog2Layout.setVerticalGroup(
            jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDialog2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel25)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE)
                .addGroup(jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jButton6)
                    .addComponent(jButton7))
                .addContainerGap())
        );
        jDialog3.setMinimumSize(new java.awt.Dimension(550, 500));
        jLabel9.setText("Count of injured people:");

        jLabel10.setText("?");

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(jTable2);

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane3.setViewportView(jTable3);

        jTable4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane4.setViewportView(jTable4);

        jLabel11.setText("Cars:");

        jLabel12.setText("Witness:");

        jLabel13.setText("Injured:");

        jLabel14.setText("Another information about accident:");

        jLabel15.setText("Count of dead people:");

        jLabel16.setText("?");

        jLabel17.setText("Count of injured and dead people on the road:");

        jLabel18.setText("?");

        jLabel19.setText("Surface of crossroads/road:");

        jLabel20.setText("?");

        jLabel21.setText("Distance betwen witness and vehicle:");

        jTable5.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane5.setViewportView(jTable5);

        javax.swing.GroupLayout jDialog3Layout = new javax.swing.GroupLayout(jDialog3.getContentPane());
        jDialog3.getContentPane().setLayout(jDialog3Layout);
        jDialog3Layout.setHorizontalGroup(
            jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDialog3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jDialog3Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addContainerGap(612, Short.MAX_VALUE))
                    .addGroup(jDialog3Layout.createSequentialGroup()
                        .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)
                        .addGap(514, 514, 514))
                    .addGroup(jDialog3Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel10)
                        .addGap(27, 27, 27)
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel16)
                        .addContainerGap())
                    .addGroup(jDialog3Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel18)
                        .addContainerGap(545, Short.MAX_VALUE))
                    .addGroup(jDialog3Layout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel20)
                        .addContainerGap(662, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDialog3Layout.createSequentialGroup()
                        .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
                            .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jDialog3Layout.createSequentialGroup()
                                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel12)
                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 286, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel13)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 377, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE))
                        .addGap(171, 171, 171))))
        );
        jDialog3Layout.setVerticalGroup(
            jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jDialog3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, 0, 0, Short.MAX_VALUE)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel21)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel14)
                .addGap(9, 9, 9)
                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(jLabel10)
                    .addComponent(jLabel16)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jLabel20))
                .addGap(46, 46, 46))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("YASDATMCC - Yet Another Simple Database Application To Manager Car Crashes");
        jMenu1.setText("Menu");
        jMenuItem4.setText("Logout");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItem4);

        jMenuItem3.setText("Login");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItem3);

        jMenu1.add(jSeparator1);

        jMenuItemNew.setText("New");
        jMenuItemNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemNewActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItemNew);

        jMenuItemLoad.setText("Load");
        jMenuItemLoad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemLoadActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItemLoad);

        jMenu1.add(jSeparator2);

        jMenuItem5.setText("Create DB");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItem5);

        jMenu1.add(jSeparator3);

        jMenuItem1.setText("Exit");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });

        jMenu1.add(jMenuItem1);

        jMenuBar1.add(jMenu1);

        jMenu3.setText("Modules");
        jCheckBoxMenuItem1.setText("SQL Console");
        jCheckBoxMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxMenuItem1ActionPerformed(evt);
            }
        });

        jMenu3.add(jCheckBoxMenuItem1);

        jMenuBar1.add(jMenu3);

        jMenu2.setText("Help");
        jMenuItem2.setText("Content");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });

        jMenu2.add(jMenuItem2);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
// TODO add your handling code here:
        try {            
            /*
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("drop table ACCIDENTS;drop sequence seq_accidents;drop sequence seq_objects;drop type VEHICLES_N;drop type WITNESS_N;drop type INJURED_N;drop type OBJECTS_N;drop type WITNESS_T;drop type IMAGE_T;drop type VEHICLES_T;drop type INJURED_T;drop type OBJECTS_T;commit");            
            OracleResultSet res = (OracleResultSet) stmt.executeQuery();
            */
            sqlComm.SqlComm.getInstance().getConn().setAutoCommit(false); 
            sqlComm.SqlComm.getInstance().getConn().commit();
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type IMAGE_T as object(name VARCHAR2(50),description VARCHAR2(1000),image ORDSYS.ORDIMAGE, signature ORDSYS.ORDIMAGESIGNATURE)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type WITNESS_T as object(pin VARCHAR2(11),name VARCHAR2(50),geometry MDSYS.SDO_GEOMETRY,image IMAGE_T)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type VEHICLES_T as object(spz VARCHAR2(20),type VARCHAR2(30),driver VARCHAR2(50),geometry MDSYS.SDO_GEOMETRY)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type INJURED_T as object(pin VARCHAR2(11),name VARCHAR2(50),survive NUMBER,geometry MDSYS.SDO_GEOMETRY)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type OBJECTS_T as object(id NUMBER,type VARCHAR2(50),geometry MDSYS.SDO_GEOMETRY)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type VEHICLES_N as table of VEHICLES_T");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type WITNESS_N as table of WITNESS_T");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type INJURED_N as table of INJURED_T");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create or replace type OBJECTS_N as table of OBJECTS_T");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create sequence seq_accidents start with 1 increment by 1");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create sequence seq_objects start with 1 increment by 1");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create table ACCIDENTS(gid NUMBER PRIMARY KEY,name VARCHAR(50),geometry MDSYS.SDO_GEOMETRY,vehicles VEHICLES_N,witness WITNESS_N,injured INJURED_N,objects OBJECTS_N)NESTED TABLE vehicles STORE AS ntab_vehicles,NESTED TABLE witness STORE AS ntab_witness,NESTED TABLE injured STORE AS ntab_injured,NESTED TABLE objects STORE AS ntab_objects");            
            stmt.executeUpdate();
           
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("insert into user_sdo_geom_metadata values('ntab_vehicles', 'geometry',mdsys.sdo_dim_array(mdsys.sdo_dim_element('X', 0, 400, 0.005),mdsys.sdo_dim_element('Y', 0, 400, 0.005)), NULL)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("insert into user_sdo_geom_metadata values('ntab_witness', 'geometry',mdsys.sdo_dim_array(mdsys.sdo_dim_element('X', 0, 400, 0.005), mdsys.sdo_dim_element('Y', 0, 400, 0.005)), NULL)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("insert into user_sdo_geom_metadata values('ntab_injured', 'geometry',mdsys.sdo_dim_array(mdsys.sdo_dim_element('X', 0, 400, 0.005),mdsys.sdo_dim_element('Y', 0, 400, 0.005)), NULL)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("insert into user_sdo_geom_metadata values('ntab_objects', 'geometry',mdsys.sdo_dim_array(mdsys.sdo_dim_element('X', 0, 400, 0.005), mdsys.sdo_dim_element('Y', 0, 400, 0.005)), NULL)");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("insert into user_sdo_geom_metadata values('accidents', 'geometry', mdsys.sdo_dim_array(mdsys.sdo_dim_element('X', 0, 400, 0.005), mdsys.sdo_dim_element('Y', 0, 400, 0.005)), NULL)");            
            stmt.executeUpdate();
           
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create index vehicles_i on ntab_vehicles(geometry) indextype is MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=6, SDO_NUMTILES=12')");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create index witness_i on ntab_witness(geometry) indextype is MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=6, SDO_NUMTILES=12')");            
            stmt.executeUpdate();
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create index injured_i on ntab_injured(geometry) indextype is MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=6, SDO_NUMTILES=12')");            
            stmt.executeUpdate();     
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create index objects_i on ntab_objects(geometry) indextype is MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=6, SDO_NUMTILES=12')");            
            stmt.executeUpdate();     
            
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("create index accidents_i on accidents(geometry) indextype is MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=6, SDO_NUMTILES=12')");            
            stmt.executeUpdate();
            
            sqlComm.SqlComm.getInstance().getConn().commit(); 
            sqlComm.SqlComm.getInstance().getConn().setAutoCommit(true);
            
        }
        catch (SQLException ex) {
                ex.printStackTrace();
            }
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed

        populateDialog2W();
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed

        populateDialog2WI();
    
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed

       try {
            // select c.gid, c.name, c.geometry.SDO_ORDINATES from accidents c where c.gid = '1';
            String id = (String)jTable6.getModel().getValueAt(jTable6.getSelectedRow(),1);
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select w.image.image from accidents a, table(a.witness) w where w.pin=?");            

            stmt.setString(1, id);
            OracleResultSet res = (OracleResultSet) stmt.executeQuery(); 
            //DefaultTableModel data = new DefaultTableModel();
            //jTable6.setModel(data);            
            
            ImageViewer view = new ImageViewer(this, true);
            view.loadQuery(stmt);
            view.setSize(400,400);
            view.setVisible(true);
            view.dispose();
       
       
        }
        catch (SQLException ex) {
                ex.printStackTrace();
            }
        
        
       

        
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed

        populateDialog2("select a.gid, a.name from accidents a");
    }//GEN-LAST:event_jButton9ActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed

        String text = jTextField8.getText();
        populateDialog2("select a.gid, a.name from accidents a, table(a.witness) w  where w.image.description like '%" + text + "%'");
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
     try {
            int id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            OracleResultSet res = (OracleResultSet) sqlComm.SqlComm.getInstance().doQuery("DELETE FROM accidents WHERE gid = " + String.valueOf(id));
     }
     catch (Exception e) {
     }
     this.populateDialog2();

    }//GEN-LAST:event_jButton7ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed

        try {
            // select c.gid, c.name, c.geometry.SDO_ORDINATES from accidents c where c.gid = '1';
            int id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select v.driver, v.spz, v.type, SDO_GEOM.SDO_AREA(V.geometry, MD.DIMINFO) \"surface\" from accidents c, table(c.vehicles) v, USER_SDO_GEOM_METADATA MD where c.gid = ? and MD.table_name = 'NTAB_VEHICLES' ");
            stmt.setString(1, String.valueOf(id));
            OracleResultSet res = (OracleResultSet) stmt.executeQuery(); 
            DefaultTableModel data = new DefaultTableModel(); 
            jTable2.setModel(data); //pridano
            
            data.addColumn("Driver");
            data.addColumn("RN");
            data.addColumn("Type");
            data.addColumn("Surface");
            
            Vector v;
            DecimalFormat myFormatter = new DecimalFormat("###.###");
            while(res.next()) {
                v = new Vector();
                v.addElement(new String(res.getString(1)));
                v.addElement(new String(res.getString(2)));
                v.addElement(new String(res.getString(3)));                              
                v.addElement(new String(myFormatter.format(res.getDouble(4))));
                data.addRow(v);
            }
            
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select w.pin, w.name from accidents c, table(c.witness) w where c.gid = ?");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            data = new DefaultTableModel();
            jTable3.setModel(data);
            
            data.addColumn("PIN");
            data.addColumn("Name");
                     
            
            while(res.next()) {
                v = new Vector();
                v.addElement(new String(res.getString(1)));
                v.addElement(new String(res.getString(2)));
                
                data.addRow(v);
            }
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select w.pin, w.name, w.survive from accidents c, table(c.injured) w where c.gid = ?");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            data = new DefaultTableModel();
            jTable4.setModel(data);
            
            data.addColumn("PIN");
            data.addColumn("Name");
            data.addColumn("Survie");
                     
            
            while(res.next()) {
                v = new Vector();
                v.addElement(new String(res.getString(1)));
                v.addElement(new String(res.getString(2)));
                if (res.getString(3).equals("1") ) {
                    v.addElement(new String("survive"));
                } else {                    
                    v.addElement(new String("dead"));
                }
            
                data.addRow(v);
            }
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select W.name, V.type, V.spz, SDO_GEOM.SDO_DISTANCE(V.geometry, MD.DIMINFO, W.geometry, MD.DIMINFO) \"distance\" from ACCIDENTS C, table(C.VEHICLES) V,  table(C.WITNESS) W, USER_SDO_GEOM_METADATA MD  where MD.table_name = 'NTAB_WITNESS' and c.gid = ?");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            data = new DefaultTableModel();
            jTable5.setModel(data);
            
            data.addColumn("Name");
            data.addColumn("Vehicle");
            data.addColumn("RN");
            data.addColumn("Distance");
            
            while(res.next()) {
                v = new Vector();
                v.addElement(new String(res.getString(1)));
                v.addElement(new String(res.getString(2)));
                v.addElement(new String(res.getString(3)));
                v.addElement(new String(myFormatter.format(res.getDouble(4))));                
                data.addRow(v);
            }
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select count(i.name) as pocet from ACCIDENTS c, table(c.INJURED) i where c.gid = ? and i.survive='1'");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            res.next(); 
            
            jLabel10.setText(res.getString(1));
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select count(i.name) as pocet from ACCIDENTS c, table(c.INJURED) i where c.gid = ? and i.survive='0'");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            res.next(); 
            
            jLabel16.setText(res.getString(1));
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select count(i.name) as pocet from ACCIDENTS c, table(c.INJURED) i where mdsys.sdo_inside(i.geometry,c.geometry)='TRUE' and c.gid = ?");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            res.next(); 
            
            jLabel18.setText(res.getString(1));
            
            id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
            stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select SDO_GEOM.SDO_AREA(C.geometry, MD.DIMINFO) \"surface\" from ACCIDENTS C, USER_SDO_GEOM_METADATA MD where MD.table_name = 'ACCIDENTS' and c.gid = ?");
            stmt.setString(1, String.valueOf(id));
            res = (OracleResultSet) stmt.executeQuery(); 
            res.next(); 
            
            jLabel20.setText(myFormatter.format(res.getDouble(1)));            
            
        }
        catch (SQLException ex) {
            ex.printStackTrace();
        }
      
        jDialog3.setSize(700,500);       
        jDialog3.setTitle("Accident Info");
        jDialog3.setVisible(true);
        
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed

        populateDialog2("select c.gid, c.name from ACCIDENTS c, table(c.vehicles) i where mdsys.sdo_inside(i.geometry,c.geometry)<>'TRUE' order by c.gid");
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
    
        String text = jTextField7.getText();
        populateDialog2("select C.gid, C.name from ACCIDENTS C, table(C.VEHICLES) V, USER_SDO_GEOM_METADATA MD where MD.table_name = 'NTAB_VEHICLES'  and SDO_GEOM.SDO_AREA(V.geometry, MD.DIMINFO) > " + text + " order by C.gid");
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed

        populateDialog2("select c.gid, c.name from ACCIDENTS c, table(c.VEHICLES) v, table(c.OBJECTS) o where SDO_GEOM.RELATE(v.geometry, 'determine', o.geometry, 0.005) <> 'DISJOINT' order by c.gid"); 
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

        String text = jTextField6.getText();
        populateDialog2("select C.gid, C.name from ACCIDENTS C, table(C.VEHICLES) V,  table(C.VEHICLES) V1, USER_SDO_GEOM_METADATA MD where MD.table_name = 'NTAB_VEHICLES' and V.spz <> V1.spz and SDO_GEOM.WITHIN_DISTANCE(V.geometry, MD.DIMINFO,"+ text +", V1.geometry, MD.DIMINFO)='TRUE' order by C.gid");
        
        
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        int id = Integer.parseInt((String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(),0));
        
        editor.Editor ed = new editor.Editor(this, false);
        ed.setLocationRelativeTo(this);
        ed.setVisible(true);
        ed.loadAccident(id);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jMenuItemLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemLoadActionPerformed
        jDialog2.setSize(700,650);
        jDialog2.setTitle("Load accident");
        populateDialog2();
        populateDialog2W();
        jDialog2.setVisible(true);
    }//GEN-LAST:event_jMenuItemLoadActionPerformed

    private void populateDialog2() {
        try {
            // select c.gid, c.name, c.geometry.SDO_ORDINATES from accidents c where c.gid = '1';
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select c.gid, c.name  from accidents c ");
            //stmt.setString(1, String.valueOf(accidentId));
            OracleResultSet res = (OracleResultSet) stmt.executeQuery(); 
            DefaultTableModel data = new DefaultTableModel();
            jTable1.setModel(data);

            data.addColumn("Accident ID");
            data.addColumn("Name");
            //data.addColumn("Vehicles");
            //data.addColumn("Injured");
            
            Vector v;
            while(res.next()) {
                v = new Vector();
                v.addElement(new String(res.getString(1)));
                v.addElement(new String(res.getString(2)));
              //  v.addElement(new String(String.valueOf(res.getInt(3))));
              //  v.addElement(new String(String.valueOf(res.getInt(4))));
                data.addRow(v);
            }
        }
        catch (SQLException ex) {
                ex.printStackTrace();
            }
        
    }
    
    
    private void populateDialog2(String query) {
        try {
            // select c.gid, c.name, c.geometry.SDO_ORDINATES from accidents c where c.gid = '1';
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement(query);
            //stmt.setString(1, String.valueOf(accidentId));
            OracleResultSet res = (OracleResultSet) stmt.executeQuery(); 
            DefaultTableModel data = new DefaultTableModel();
            jTable1.setModel(data);

            data.addColumn("Gid");
            data.addColumn("Name");
            
            Vector v;            
            String temp = new String();
            while(res.next()) {               
                v = new Vector();              
                               
                v.addElement(new String(res.getString(1)));
                v.addElement(new String(res.getString(2)));
                if(!(temp.equals(v.firstElement()))) {                    
                    data.addRow(v);                    
                }            
                temp = res.getString(1);
                
            }
            
        }
        catch (SQLException ex) {
                ex.printStackTrace();
            }
        
    }
    private void populateDialog2W() {
        try {
            // select c.gid, c.name, c.geometry.SDO_ORDINATES from accidents c where c.gid = '1';
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select a.name, w.pin, w.name, w.image.name, w.image.description from accidents a, table(a.witness) w where w.image.name != 'null' ");
            //stmt.setString(1, String.valueOf(accidentId));
            OracleResultSet res = (OracleResultSet) stmt.executeQuery(); 
            DefaultTableModel data = new DefaultTableModel();
            jTable6.setModel(data);

            
            
            data.addColumn("Accident");
            data.addColumn("PIN");
            data.addColumn("Witness name");
            data.addColumn("Image name");
            data.addColumn("Image Description");
            
            Vector v;
            while(res.next()) {
                v = new Vector();
                
                if(res.getString(1) != null)  
                    v.addElement(new String(res.getString(1)));
                else  v.addElement("");
                
                if(res.getString(2) != null)  
                    v.addElement(new String(res.getString(2)));
                else  v.addElement("");
                
                if(res.getString(3) != null)  
                    v.addElement(new String(res.getString(3)));
                else  v.addElement("");
                
                if(res.getString(4) != null)  
                    v.addElement(new String(res.getString(4)));
                else  v.addElement("");
                
                if(res.getString(5) != null)  
                    v.addElement(new String(res.getString(5)));
                else  v.addElement("");                 

               
                data.addRow(v);
            }
        }
        catch (SQLException ex) {
                ex.printStackTrace();
            }
    }
    
    private void populateDialog2WI() {
        try {
            // select c.gid, c.name, c.geometry.SDO_ORDINATES from accidents c where c.gid = '1';
            String id = (String)jTable6.getModel().getValueAt(jTable6.getSelectedRow(),1);
            OraclePreparedStatement stmt = (OraclePreparedStatement) sqlComm.SqlComm.getInstance().getConn().prepareStatement("select a.name, w1.pin, w1.name, w1.image.name, w1.image.description, ORDSYS.IMGScore(123) \"distance\" from accidents a, accidents b, table(a.witness) w1, table(b.witness) w2 where ORDSYS.IMGSimilar(w1.image.signature, w2.image.signature, 'color=\"0.3\" texture=\"0.3\" shape=\"0.3\" location=\"0.1\"', 100, 123) = 1 and w1.pin <> w2.pin and w2.pin = ? and w1.image.name != 'null' ORDER BY \"distance\"");
            stmt.setString(1, id);
            OracleResultSet res = (OracleResultSet) stmt.executeQuery(); 
            DefaultTableModel data = new DefaultTableModel();
            jTable6.setModel(data);

            
            
            data.addColumn("Accident");
            data.addColumn("PIN");
            data.addColumn("Witness name");
            data.addColumn("Image name");
            data.addColumn("Image Description");
            data.addColumn("Distance");
            
            Vector v;
            while(res.next()) {
                v = new Vector();
                                
                if(res.getString(1) != null)  
                    v.addElement(new String(res.getString(1)));
                else  v.addElement("");
                
                if(res.getString(2) != null)  
                    v.addElement(new String(res.getString(2)));
                else  v.addElement("");
                
                if(res.getString(3) != null)  
                    v.addElement(new String(res.getString(3)));
                else  v.addElement("");
                
                if(res.getString(4) != null)  
                    v.addElement(new String(res.getString(4)));
                else  v.addElement("");
                
                if(res.getString(5) != null)  
                    v.addElement(new String(res.getString(5)));
                else  v.addElement(""); 
                
                if(res.getString(6) != null)  
                    v.addElement(new String(res.getString(6)));
                else  v.addElement("");
               
                data.addRow(v);
            }
        }
        catch (SQLException ex) {
                ex.printStackTrace();
            }
    }
            
    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
// TODO add your handling code here:
    }//GEN-LAST:event_jTextField1ActionPerformed

    private void jMenuItemNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNewActionPerformed
        editor.Editor ed = new editor.Editor(this, false);
        ed.setLocationRelativeTo(this);
        ed.setVisible(true);
    }//GEN-LAST:event_jMenuItemNewActionPerformed

    // Logout button
    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        offline = true;
        sqlComm.SqlComm.getInstance().destroy();
        jMenuItem3.setEnabled(true);
        jMenuItem4.setEnabled(false);
    }//GEN-LAST:event_jMenuItem4ActionPerformed
    // Login button
    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        jDialog1.setVisible(true);
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jToggleButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton2ActionPerformed
        jDialog1.setVisible(false);
    }//GEN-LAST:event_jToggleButton2ActionPerformed

    private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton1ActionPerformed
        jDialog1.setVisible(false);
        try {
            sqlComm.SqlComm.getInstance().init(jTextField1.getText(), jTextField2.getText(), jTextField3.getText());
            offline = false;
            jMenuItem3.setEnabled(false);
            jMenuItem4.setEnabled(true);

        }
        catch (Exception e) {
            offline = true;
            JOptionPane.showMessageDialog(this,
            "Damn, I am unable to connect ?!.",
            "Insane",
            JOptionPane.ERROR_MESSAGE );
        }
    }//GEN-LAST:event_jToggleButton1ActionPerformed

    private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField5ActionPerformed
        String str = new String("jdbc:oracle:thin:");
        str += "@" + jTextField4.getText() + ":" + jTextField5.getText();
        jTextField1.setText(str);
    }//GEN-LAST:event_jTextField5ActionPerformed

    private void jCheckBoxMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxMenuItem1ActionPerformed
        if(jCheckBoxMenuItem1.getState())
            consoleModule.setVisible(true);
        else
            consoleModule.setVisible(false);
    }//GEN-LAST:event_jCheckBoxMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        BareBonesBrowserLaunch browser = new BareBonesBrowserLaunch();
        browser.openURL("http://www.frystak.php5.cz/");
        
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    public static boolean isOffline() {
        return offline;
    }
    
    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jMenuItem1ActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainWindow().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JDialog jDialog2;
    private javax.swing.JDialog jDialog3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItemLoad;
    private javax.swing.JMenuItem jMenuItemNew;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTable3;
    private javax.swing.JTable jTable4;
    private javax.swing.JTable jTable5;
    private javax.swing.JTable jTable6;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JToggleButton jToggleButton2;
    // End of variables declaration//GEN-END:variables
}
